
#ifndef GLTF_WRITER_H
#define GLTF_WRITER_H

#include <string>
#include "util/dtk_maindoc_ptr.hpp"
#include "WriterBase.hpp"
#include <unordered_map>
#include <locale>

class Dtk_GltfWriter;


namespace  AMCAX::Exchange 
{
    class GltfWriter : public WriterBase
    {
    public:
        GltfWriter() {};
        virtual ~GltfWriter();
        Dtk_ErrorStatus WriteInit(Dtk_string dumpFile, const Dtk_string& outputFile) override;
        Dtk_ErrorStatus WriteInit(Dtk_string dumpFile, const Dtk_string& outputFile, int option) override;
        Dtk_ErrorStatus WriteEnd() override;
        void WriteMesh(Dtk_MeshPtr& inMeshToWrite, Dtk_tab<Dtk_ID>& outIds) override;


    private:
        Dtk_string m_outputFileName;
        Dtk_GltfWriter* m_GW;
        std::locale m_backupLocale;
    };
}

#endif